<html>
<head><meta charset="utf-8"><title>How to avoid rebuilding all the time when using LSP · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20avoid.20rebuilding.20all.20the.20time.20when.20using.20LSP.html">How to avoid rebuilding all the time when using LSP</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="245424364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20avoid%20rebuilding%20all%20the%20time%20when%20using%20LSP/near/245424364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20avoid.20rebuilding.20all.20the.20time.20when.20using.20LSP.html#245424364">(Jul 09 2021 at 10:06)</a>:</h4>
<p>How to avoid rebuilding a chunk of the project every time when using LSP and <code>cargo run</code>? I think what happens right now is that when I save the file LSP runs <code>cargo check</code> which invalidates the cache for <code>cargo run</code> and so when I run <code>cargo run</code>, <code>cargo</code> rebuilds half of the dependency tree.</p>



<a name="245424417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20avoid%20rebuilding%20all%20the%20time%20when%20using%20LSP/near/245424417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20avoid.20rebuilding.20all.20the.20time.20when.20using.20LSP.html#245424417">(Jul 09 2021 at 10:07)</a>:</h4>
<p>Make sure you have the same <code>RUSTFLAGS</code> set for both. The they shouldn't invalidate each others cache.</p>



<a name="245424655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20avoid%20rebuilding%20all%20the%20time%20when%20using%20LSP/near/245424655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20avoid.20rebuilding.20all.20the.20time.20when.20using.20LSP.html#245424655">(Jul 09 2021 at 10:09)</a>:</h4>
<p>I haven't set that envvar, <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="245424738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20avoid%20rebuilding%20all%20the%20time%20when%20using%20LSP/near/245424738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20avoid.20rebuilding.20all.20the.20time.20when.20using.20LSP.html#245424738">(Jul 09 2021 at 10:10)</a>:</h4>
<p>Ah, I think I know why, I'll have openssl specific envvar set differently.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>